﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="AddUser.aspx.cs" Inherits="SwenAssigment.AddUser" %>
<%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .auto-style5 {
        }
        .auto-style6 {
            width: 569px;
        }
        .auto-style7 {
            width: 389px;
        }
        .auto-style8 {
            width: 380px;
        }
        .auto-style9 {
            width: 261px;
        }
        .auto-style10 {
            width: 169px;
        }
        .auto-style11 {
            width: 169px;
            height: 29px;
        }
        .auto-style12 {
            width: 261px;
            height: 29px;
        }
        .auto-style13 {
            height: 29px;
        }
        .auto-style14 {
            width: 109px;
        }
        .auto-style15 {
            width: 109px;
            height: 20px;
        }
        .auto-style16 {
            width: 329px;
        }
        .auto-style17 {
            height: 20px;
            width: 329px;
        }
        .auto-style18 {
            width: 109px;
            height: 28px;
        }
        .auto-style19 {
            width: 329px;
            height: 28px;
        }
        .auto-style20 {
            height: 28px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1>Create User</h1>
    <table style="width: 100%;">
        <tr>
            <td class="auto-style11">Search by:
                <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" ValidationGroup="a">
                    <asp:ListItem Selected="True">All</asp:ListItem>
                    <asp:ListItem>Staff ID</asp:ListItem>
                    <asp:ListItem>Name</asp:ListItem>
                    <asp:ListItem>Nric</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td class="auto-style12">
                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
&nbsp;<asp:Label ID="Label1" runat="server" ForeColor="Red" Text="*Error" Visible="False"></asp:Label>
            </td>
            <td class="auto-style13">
                <asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="search" ValidationGroup="a" />
            </td>
        </tr>
        <tr>
            <td class="auto-style10">&nbsp;</td>
            <td class="auto-style9">&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td class="auto-style5" colspan="3">
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="StaffId,StaffName" OnPageIndexChanging="GridView1_PageIndexChanging" PageSize="5" OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
                    <Columns>
                        <asp:BoundField DataField="StaffId" HeaderText="Staff ID" />
                        <asp:BoundField DataField="StaffName" HeaderText="Staff Name" />
                        <asp:BoundField DataField="NRIC" HeaderText="NRIC" />
                        <asp:BoundField DataField="ContactNumber" HeaderText="Contact Number" />
                        <asp:BoundField DataField="Job" HeaderText="Job" />
                        <asp:CommandField SelectText="Create Account" ShowCancelButton="False" ShowSelectButton="True" />
                    </Columns>
                    <EmptyDataTemplate>
                        There is no matching data!
                    </EmptyDataTemplate>
                </asp:GridView>
            </td>
        </tr>
    </table>
    <div>

        <table style="width:100%;">
            <tr>
                <td class="auto-style14">Staff Name:</td>
                <td class="auto-style16">
                    <asp:TextBox ID="TextBox2" runat="server" ReadOnly="True" ValidationGroup="x"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox2" ErrorMessage="*Require" ForeColor="Red" ValidationGroup="x"></asp:RequiredFieldValidator>
                </td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td class="auto-style18">Staff ID:</td>
                <td class="auto-style19">
                    <asp:TextBox ID="TextBox3" runat="server" ReadOnly="True" ValidationGroup="x"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="TextBox3" ErrorMessage="*Require" ForeColor="Red" ValidationGroup="x"></asp:RequiredFieldValidator>
                </td>
                <td class="auto-style20"></td>
            </tr>
            <tr>
                <td class="auto-style14">Role:</td>
                <td class="auto-style16">
                    <asp:DropDownList ID="DropDownList2" runat="server">
                        <asp:ListItem>Normal</asp:ListItem>
                        <asp:ListItem>Management</asp:ListItem>
                        <asp:ListItem>Admin</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td class="auto-style14">User Name:</td>
                <td class="auto-style16">
                    <asp:TextBox ID="TextBox6" runat="server" ValidationGroup="x"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="TextBox6" ErrorMessage="*Require" ForeColor="Red" ValidationGroup="x"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator7" runat="server" ControlToValidate="TextBox6" ErrorMessage="*Error Format min 4 max 20" ForeColor="Red" ValidationExpression="[0-9a-zA-Z]{4,20}$" ValidationGroup="x"></asp:RegularExpressionValidator>
                </td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td class="auto-style15">Password:</td>
                <td class="auto-style17">
                    <asp:TextBox ID="TextBox4" runat="server" ValidationGroup="x"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="TextBox4" ErrorMessage="*Require" ForeColor="Red" ValidationGroup="x"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator8" runat="server" ControlToValidate="TextBox4" ErrorMessage="*Error Format min 4 max 20" ForeColor="Red" ValidationExpression="[0-9a-zA-Z]{4,20}$" ValidationGroup="x"></asp:RegularExpressionValidator>
                </td>
                <td class="auto-style4"></td>
            </tr>
            <tr>
                <td class="auto-style14">Confirm Password:</td>
                <td class="auto-style16">
                    <asp:TextBox ID="TextBox5" runat="server" ValidationGroup="x"></asp:TextBox>
                    <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="TextBox4" ControlToValidate="TextBox5" ErrorMessage="*Not Same" ForeColor="Red" ValidationGroup="x"></asp:CompareValidator>
                </td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td class="auto-style14">&nbsp;</td>
                <td class="auto-style16">&nbsp;</td>
                <td>
                    <asp:Button ID="Button4" runat="server" OnClick="Button4_Click" Text="Create" ValidationGroup="x" />
                </td>
            </tr>
        </table>

    </div>
</asp:Content>
